#!/bin/bash                                                                                                                                                   
                                                                                                                                                              
 echo "进入starat.sh脚本"                                                                                                                                                             
                                                                                                                                                              
# set ulimit                                                                                                                                                  
                                                                                                                                                              
ulimit -n 102400   

rm -rf opt/tengine/www/dist/
rm -rf /opt/tengine/conf/conf.d/     
mkdir  /opt/tengine/conf/conf.d/                                                                                                                                       
envsubst  '$WEB_HOST_URL' </conf.d/nginx.template> /opt/tengine/conf/conf.d/nginx.conf 

cat   /opt/tengine/conf/conf.d/nginx.conf 
cp -r /dist/ /opt/tengine/www/ 

# start nginx service                                                                                                                                         
                                                                                                                                                              
/opt/tengine/sbin/nginx    